<!doctype html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>商品列表</title>
    <link rel="stylesheet" href="layui/css/layui.css" th:href="@{/layui/css/layui.css}">
    <link rel="stylesheet" href="fonts/iconfonts.css" th:href="@{/fonts/iconfonts.css}">
    <script type="text/javascript" src="js/jquery.min.js" th:src="@{/js/jquery.min.js}"></script>
    <script type="text/javascript" src="layui/layui.js" th:src="@{/layui/layui.js}"></script>
    <script type="text/javascript" src="/js/topic.js" th:src="@{/js/topic.js}"></script>
</head>
<body>
<!-- 条件查询商品列表，表单 -->
    <form class="layui-form" id="searchForm">
        <div class="layui-form-item" style="display: inline">
            <div class="layui-inline">
                <div class="layui-input-inline">
                    <input type="text" class="layui-input" name="theme" id="theme" placeholder="请输入主题">
                </div>
            </div>
            <div class="layui-inline">
                <div class="layui-input-inline">
                    <input type="text"  class="layui-input" name="description" id="description" placeholder="请输入描述">
                </div>
            </div>
        <!-- 日期范围选择 -->
            <div class="layui-inline">
                <input type="text" name="dateRange" id="dateRange" class="layui-input" placeholder="选择日期范围" style="width: 200px;">
            </div>
            <button type="button" class="layui-btn" id="searchBtn" data-type="reload" >搜索</button>
        </div>
    </form>
<!-- 数据表格 -->
    <table width="100%" class="layui-hide" id="topicList" lay-filter="topicList">

    </table>

<!-- 头部工具栏 -->
    <script type="text/html" id="toolbarList">
        <button class="layui-btn layui-btn-sm layui-btn-normal" lay-event="addTopic">发帖子</button>
        <button class="layui-btn layui-btn-sm layui-btn-primary" lay-event="refresh"><i class="iconfont iconshuaxin"></i>&nbsp;刷新</button>
    </script>
<!--  行内工具栏  -->
    <script type="text/html" id="barInline">
        {{# if(d.state == 1 ){ }}
            <a class="layui-btn layui-btn-xs layui-btn-normal" lay-event="toTopicDetail">详情</a>
            <a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="del">删除</a>
        {{# } else if(d.state == 0){ }}
            已删除
        {{# }  }}
    </script>

<!-- 数据格式 -->
    <script type="text/html" id="themeTpl">
        {{# if(d.hotDegree == 1){ }}
            <i class="iconfont iconfire" style="color:#f4ea2a"></i>
        {{# }else if(d.hotDegree == 2){  }}
            <i class="iconfont iconfire" style="color:#e98f36"></i>
        {{# }else if(d.hotDegree == 3){  }}
            <i class="iconfont iconfire" style="color:#d81e06"></i>
        {{#  } }}
        {{d.theme}}
    </script>

    <script type="text/html" id="userTpl">
        {{d.user.nickName}}
    </script>

</body>
</html>